return cursor;
}
+static GdkCursor *
+create_blank_cursor (void)
+{
+ NSCursor *nscursor;
+ NSImage *nsimage;
+ NSSize size = { 1.0, 1.0 };
+
+ nsimage = [[NSImage alloc] initWithSize:size];
+ nscursor = [[NSCursor alloc] initWithImage:nsimage
+ hotSpot:NSMakePoint(0.0, 0.0)];
+ [nsimage release];
+
+ return gdk_quartz_cursor_new_from_nscursor (nscursor, GDK_BLANK_CURSOR);
+}
+
static gboolean
get_bit (const guchar *data,
gint width,
NSImage *image;
NSCursor *nscursor;
- if (cursor_type >= G_N_ELEMENTS (xcursors))
+ if (cursor_type >= G_N_ELEMENTS (xcursors) || cursor_type < 0)
return NULL;
cursor = cached_xcursors[cursor_type];
case GDK_HAND2:
nscursor = [NSCursor pointingHandCursor];
break;
+ case GDK_CURSOR_IS_PIXMAP:
+ return NULL;
+ case GDK_BLANK_CURSOR:
+ return create_blank_cursor ();
default:
return gdk_cursor_ref (create_builtin_cursor (cursor_type));
}